package com.blb.service.impl;

import com.blb.dao.TopicDao;
import com.blb.dao.impl.TopicDaoImpl;
import com.blb.pojo.Topic;
import com.blb.service.ITopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class TopicServiceImpl implements ITopicService {
    @Autowired
    TopicDao topicDao;
    @Override
    public void add(Topic topic) throws SQLException {
        topicDao.add(topic);
    }
    /**
     * 朋友圈信息
     */
    @Override
    public List<Topic> list() throws Exception {
        List<Topic> topiclist = topicDao.Topiclist();
        return topiclist;

    }

    /**
     * 删除
     * @param id
     * @throws SQLException
     */
    @Override
    public void delete(String id) throws SQLException {
        topicDao.delete(id);
    }
}
